<?php /* Smarty version 2.6.26, created on 2018-07-20 02:32:08
         compiled from E:%5CWWW%5C40.125.208.171%5Cvweb/admin%5Ctemplates/shop/index.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="nav"><span>店铺评分</span></div>
<div class="filter"> 
	<a href="?m=member&a=edit&shop=1" class="add">添加商户</a>
	<a href="?m=shop" class="<?php if ($_GET['type'] == ''): ?>option_ch<?php else: ?>option<?php endif; ?>">全部</a>
	<a href="?m=shop&type=1" class="<?php if ($_GET['type'] == '1'): ?>option_ch<?php else: ?>option<?php endif; ?>">个人</a>
	<a href="?m=shop&type=2" class="<?php if ($_GET['type'] == '2'): ?>option_ch<?php else: ?>option<?php endif; ?>">企业</a>
	<a href="?m=shop&type=3" class="<?php if ($_GET['type'] == '3'): ?>option_ch<?php else: ?>option<?php endif; ?>">自营</a> 
</div> 
<div class="main">
	<table width="100%" class="ltable">
	  	<thead>
		  	<tr> 
				<th width="80">类型</th> 
				<th width="200">店铺名</td> 
				<th width="100">联系电话</th> 
				<th width="60">账户</th>  
				<th width="60">状态</th> 
				<th width="60">认证状态</th>
				<th width="40" class="center">热门</th>
				<th width="40" class="center">推荐</th>
				<th width="255">店铺操作</th>
				<th width="120">创建时间</th>
				<th></th>
		  	</tr>
	  	</thead>  
		<tbody>
		<?php if ($this->_tpl_vars['data']['list']): ?>
			<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
				<tr>
					<td>
						<?php if ($this->_tpl_vars['i']['type'] == '1'): ?>
							个人
						<?php elseif ($this->_tpl_vars['i']['type'] == '2'): ?>
							企业
						<?php elseif ($this->_tpl_vars['i']['type'] == '3'): ?>
							<span style="color:#FF0000; font-weight:bold;">自营</span>
						<?php endif; ?>
					</td> 
					<td><a href="?m=shop&a=enter&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank"><?php echo $this->_tpl_vars['i']['name']; ?>
</a></td>
					<td><?php echo $this->_tpl_vars['i']['mobile']; ?>
</td> 
					<td><?php echo $this->_tpl_vars['i']['price']; ?>
</td>  
					<td><?php if ($this->_tpl_vars['i']['status']): ?>正常<?php else: ?><span style="color:#FF0000; font-weight:bold;">关闭</span><?php endif; ?></td> 
					<td>
						<a href="?m=shop&a=auth&id=<?php echo $this->_tpl_vars['i']['id']; ?>
">
						<?php if ($this->_tpl_vars['i']['status'] == '1'): ?>
							已认证
						<?php elseif ($this->_tpl_vars['i']['status'] == '2'): ?>
							已提交
						<?php else: ?>
							<span style="color:#FF0000; font-weight:bold;">待审核</span>
						<?php endif; ?>
						</a>
					</td> 
					<td class="center"><a href="javascript:status('<?php echo $this->_tpl_vars['i']['id']; ?>
','px_hot')" id="px_hot_<?php echo $this->_tpl_vars['i']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['__APP__']; ?>
public/images/status_<?php echo $this->_tpl_vars['i']['px_hot']; ?>
.png"></a></td>
				<td class="center"><a href="javascript:status('<?php echo $this->_tpl_vars['i']['id']; ?>
','px_recommend')" id="px_recommend_<?php echo $this->_tpl_vars['i']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['__APP__']; ?>
public/images/status_<?php echo $this->_tpl_vars['i']['px_recommend']; ?>
.png"></a></td>
					<td>
						<a href="?m=shop&a=edit&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" class="edit">操作</a>
						<a href="?m=shop&a=score&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" class="edit">评分</a>
						<a href="?m=shop&a=enter_shop&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="view">进入</a> 
						<a href="?m=shop&a=del&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" class="del">删除</a> 
					</td>
					<td><?php echo $this->_tpl_vars['i']['addtime']; ?>
</td>
					<td></td>
				</tr>
			<?php endforeach; endif; unset($_from); ?>
		<?php else: ?>
			<tr><td colspan="9">还没有数据，赶快添加吧！</td></tr>
		<?php endif; ?> 
		</tbody>  
	</table> 
	<?php if ($this->_tpl_vars['data']['page']): ?><div class="page"><?php echo $this->_tpl_vars['data']['page']; ?>
</div><?php endif; ?>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script type="text/javascript"> 
function status(id,type){ 
	$.post("?m=shop&a=px_status&jq_time="+new Date().getTime(), {id:id, type:type}, function(data){
 		if(data == '0' || data == '1'){
			$("#"+type+"_"+id+" img").attr('src','<?php echo $this->_tpl_vars['__APP__']; ?>
public/images/status_'+data+'.png');
		}else{ alert('更新失败'); } 
	});	
} 
</script>